package org.ms.mconf.sdk.service.ops;

import org.ms.mconf.sdk.exception.MicroConfigException;
import org.ms.mconf.sdk.model.NodeConfig;

import java.util.Set;

/**
 * The Node Service
 *
 * @author lry
 */
public interface INodeService {

    /**
     * The publish node
     *
     * @param nodeConfig node config {@link NodeConfig}
     * @return successful return to true
     * @throws MicroConfigException micro config exception
     */
    boolean publish(NodeConfig nodeConfig) throws MicroConfigException;

    /**
     * The delete node
     *
     * @param node node id
     * @return successful return to true
     * @throws MicroConfigException micro config exception
     */
    boolean delete(String node) throws MicroConfigException;

    /**
     * The get node list
     *
     * @return node list
     * @throws MicroConfigException micro config exception
     */
    Set<NodeConfig> query() throws MicroConfigException;

}
